package com.training.iyogo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.training.iyogo.dao.ICourseDAO;
import com.training.iyogo.domain.Course;
import com.training.iyogo.service.ICourseService;

@Service
public class CourseService implements ICourseService{
	@Autowired
	private ICourseDAO courseDao;
	
	@Override
	public void addCourse(Course course) {
		courseDao.save(course);
		
	}

	@Override
	public Course getByName(String name) {
		// TODO Auto-generated method stub
		return courseDao.findByName(name);
	}
}
